# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=fribidi
pkgver=1.0.14
pkgrel=0
pkgdesc="Free Implementation of the Unicode Bidirectional Algorithm"
url="https://github.com/fribidi/fribidi"
arch="all"
license="LGPL-2.1-or-later"
makedepends="meson"
subpackages="$pkgname-doc $pkgname-static $pkgname-dev"
source="https://github.com/fribidi/fribidi/releases/download/v$pkgver/fribidi-$pkgver.tar.xz"

# secfixes:
#   1.0.12-r0:
#     - CVE-2022-25308
#     - CVE-2022-25309
#     - CVE-2022-25310
#   1.0.7-r1:
#     - CVE-2019-18397

build() {
	abuild-meson \
		-Ddefault_library=both \
	. output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
70270826625767a916156c9d752d8ad02c71b33d532060981680942c5121746bb9b0272a3f2188b9019e841c642d1ad686bbc3e7ba54a2f951baa532b01b059a  fribidi-1.0.14.tar.xz
"
